#ifndef WXSFLOATPROPERTY_H
#define WXSFLOATPROPERTY_H

#include "wxsproperty.h"


class wxsFloatProperty: public wxsProperty {
  public:


    wxsFloatProperty( const wxString& PGName, const wxString& DataName, long Offset, double Default = 0.0f, int Priority = 100 );


    virtual const wxString GetTypeName() { return _T( "float" ); }

  protected:

    virtual void PGCreate( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Parent );
    virtual bool PGRead( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Id, long Index );
    virtual bool PGWrite( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Id, long Index );
    virtual bool XmlRead( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool XmlWrite( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool PropStreamRead( wxsPropertyContainer* Object, wxsPropertyStream* Stream );
    virtual bool PropStreamWrite( wxsPropertyContainer* Object, wxsPropertyStream* Stream );

  private:
    long Offset;
    double Default;
};




#define WXS_FLOAT(ClassName,VarName,PGName,DataName,Default) \
  { static wxsFloatProperty _Property(PGName,DataName,wxsOFFSET(ClassName,VarName),Default); \
    Property(_Property); }


#define WXS_FLOAT_P(ClassName,VarName,PGName,DataName,Default,Priority) \
  { static wxsFloatProperty _Property(PGName,DataName,wxsOFFSET(ClassName,VarName),Default,Priority); \
    Property(_Property); }



#endif // WXSFLOATPROPERTY_H
